<!DOCTYPE html>

<html>
<head>
    <script type="text/javascript" src="../cordova.js"></script>
    <script type="text/javascript" src="index.js"></script>

    <script type="text/javascript" src="accessAuth_ajax.js"></script>
    <script type="text/javascript" src="../butterfly/vendor/jquery/jquery.js"></script>

    <meta charset="utf-8"/>
    <meta name="format-detection" content="telephone=no"/>
    <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
    <meta name="viewport"
          content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi"/>
    <meta name="msapplication-tap-highlight" content="no"/>
    <title>Hello World</title>
</head>
<body>
<div>
    <canvas id="circle_progress_bar" width="240px" height="240px"></canvas>
    <h1>授权状态查询...</h1>
    <!--<img src="img/splash.png">-->
</div>
<script type="text/javascript" src="animate.js"></script>
<script type="text/javascript">

    app.initialize();

    function succ() {
        setTimeout(function () {
            animator.stop();
            accessAuth.allOk();
        }, 2000);
    }

    function fail(errMsg) {
        setTimeout(function () {
            animator.stop();
            accessAuth.requireLogin();
        }, 2000);
    }

    document.addEventListener("deviceready", function () {
        animator.start();
        accessAuth.regAndCheckin(null, null, succ, fail, true);

    });
</script>

</body>
</html>
